//
//  WithDrawListCell.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/8/25.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "WithDrawListCell.h"

@interface WithDrawListCell()

@property (weak, nonatomic) IBOutlet UILabel *drawTypeLab;
@property (weak, nonatomic) IBOutlet UILabel *statusLab;
@property (weak, nonatomic) IBOutlet UILabel *accountLab;
@property (weak, nonatomic) IBOutlet UILabel *counterFeeLab;
@property (weak, nonatomic) IBOutlet UILabel *drawAmounteLab;
@property (weak, nonatomic) IBOutlet UILabel *applyTimeLab;
@property (weak, nonatomic) IBOutlet UILabel *upDateTimeLab;
@property (weak, nonatomic) IBOutlet UILabel *reasonLab;


@end

@implementation WithDrawListCell

- (void)setModel:(ChargeListModel *)model
{
    _model = model;
    NSString *type = (model.type == 1)?@"银行卡":@"支付宝";
    self.drawTypeLab.text = [NSString stringWithFormat:@"收款方式:%@",type];
    NSString *statusStr = @"";
    if (model.status == 0) {
        statusStr = @"审核中";
    }else if (model.status == 1){
        statusStr = @"通过";
    }else if (model.status == 2){
        statusStr = @"拒绝";
    }else if (model.status == 3){
        statusStr = @"已打款";
    }
    self.statusLab.text = statusStr;
    self.accountLab.text = [NSString stringWithFormat:@"收款账号:%@",model.chequesAccount];
    self.counterFeeLab.text = [NSString stringWithFormat:@"手续费:%.2f",model.free];
    self.drawAmounteLab.text = [NSString stringWithFormat:@"提现金额:%.2f  到账金额%.2f",model.amout,model.actualAmount];
    self.applyTimeLab.text = [NSString stringWithFormat:@"申请时间:%@",model.createDate];
    self.upDateTimeLab.text = [NSString stringWithFormat:@"更新时间:%@",model.updateDate];
    if (model.rejectReason.length>0) {
        self.reasonLab.text = [NSString stringWithFormat:@"拒绝理由:%@",model.rejectReason];
    }else{
        self.reasonLab.text = @"";
    }
}

@end
